package com.kapo.egroup.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kapo.egroup.entity.base.project.Project;
import com.kapo.egroup.entity.base.recruit.Recruit;
import com.kapo.egroup.entity.base.talent.Talent;
import com.kapo.egroup.mapper.ProjectMapper;
import com.kapo.egroup.mapper.TalentMapper;
import com.kapo.egroup.service.ProjectService;
import com.kapo.egroup.service.TalentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Title TalentServiceImpl
 * @Description TODO
 * @Author 86159
 * @Date 2023-04-01 14:44
 **/
@Service
public class TalentServiceImpl extends ServiceImpl<TalentMapper, Talent> implements TalentService {
    @Override
    public List<Talent> getTalentAll() {
        QueryWrapper<Talent> queryWrapper = new QueryWrapper<>();
        queryWrapper.select("_id","user_id","description");
        return baseMapper.selectList(queryWrapper);
    }

    @Override
    public void updateTalent(Talent talent) {
        QueryWrapper<Talent> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("_id",talent.getId());
        baseMapper.update(talent, queryWrapper);
    }
}
